/*	
 Builder class
 author: Martin Dorazil 2012

 */

#pragma once

#include "Villager.h"
#include "time.h"
#include <list>
#include <iostream>
#include "../../../Terrain.h"
#include <cmath>
#include "../../../scene/Timer.h"
#include "../../static/building/Building.h"

#define PI 3.14159265

const float BUILD_STEP = 1.0;
const unsigned int CHCK_WHILE_MOVE_INTERVAL = 2000;
const unsigned int BUILD_INTERVAL = 100;
const int TAX = 20;

class Builder: public Villager
{
public:
	Builder(glm::vec3 _Pos, float _r, float _speed, std::string _Name,
			std::string _modelFName, ModelPool *_mPool, PathFinder *_pathfinder,
			Terrain::Terrain *_ter);

	~Builder(void);

	virtual void setWork(Building *building);
	virtual void goingWork();
	virtual void doWork();
	virtual void goWork();

protected:
	Timer buildingTimer, chckWhileMoveTimer;

	// pointer to target building
	Building *targetBuilding;
};

